
<template>
  <van-tabbar route active-color="#ee0a24" :placeholder="true">
    <van-tabbar-item v-for="(item,index) in list" :badge="item.hot?5:null" :key="index" replace :to="{name:item.name}" :icon="item.icon">
    {{ item.text }}
    </van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      list: [
        {
          path: "/ms/home",
          name: "home",
          text: "首页",
          icon: "home-o",
        },
        {
          path: "/ms/classify",
          name: "classify",
          text: "分类",
          icon: "list-switching",
        },
        {
          path: "/ms/cart",
          name: "cart",
          text: "购物车",
          icon: "shopping-cart-o",
        },
        {
          path: "/ms/mine",
          name: "mine",
          text: "我的",
          icon: "user-o",
          hot: true,
        },
      ],
    };
  },
};
</script>